//
//  AppDelegate.swift
//  JIMWeiBo
//
//  Created by 陈恒均 on 2018/2/7.
//  Copyright © 2018年 陈恒均. All rights reserved.
//

import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?
    var defaultViewController : UIViewController{
        let isLogin = UserAccountViewModel.shareInstance.isLogin
        return isLogin ? WelcomeViewController() : UIStoryboard(name: "Main", bundle: nil).instantiateInitialViewController()!
    }


    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        
        UITabBar.appearance().tintColor = UIColor.orange
        UINavigationBar.appearance().tintColor = UIColor.orange
        
        
        window = UIWindow(frame: UIScreen.main.bounds)
        
        let rootViewController = defaultViewController
        window?.rootViewController = rootViewController
        window?.makeKeyAndVisible()
        return true
    }


}

